package com.zmsoft.persistent.sfg.Sfg661021PlayerLand;

import org.cnsoft.framework.db.manager.MyDBTableSQLSupport;
import org.springframework.stereotype.Component;

/**
 * 玩家农场土地信息建表语句
 */
@Component("Sfg661021PlayerLandSQL")
//@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class Sfg661021PlayerLandSQL extends MyDBTableSQLSupport {
	// 表名
	public String getTableName() {
		return "sfg661021_player_land";
	}

	// 获得SQL内容
	public String getSQL() throws Exception {
		StringBuilder sqlStringBuilder = new StringBuilder();// 临时变量

		sqlStringBuilder.append("CREATE TABLE sfg661021_player_land");
		sqlStringBuilder.append("(");
		sqlStringBuilder.append("    id VARCHAR(64) NOT NULL COMMENT '土地编号',");
		sqlStringBuilder.append("    player_id VARCHAR(64) COMMENT '用户ID',");
		sqlStringBuilder.append("    player_name VARCHAR(128) COMMENT '用户昵称',");
		sqlStringBuilder.append("    land_sort BIGINT(10) DEFAULT '0' COMMENT '土地序号',");
		sqlStringBuilder.append("    land_state VARCHAR(4) DEFAULT '1' COMMENT '土地状态(1未开垦2未种植3成长中5成熟待收割9收割后未翻地)',");
		sqlStringBuilder.append("    land_level BIGINT(10) DEFAULT '0' COMMENT '土地等级',");
		sqlStringBuilder.append("    land_pic_url VARCHAR(400) COMMENT '土地图片',");
		sqlStringBuilder.append("    crops_id VARCHAR(64) COMMENT '作物ID',");
		sqlStringBuilder.append("    crops_name VARCHAR(128) COMMENT '作物名称',");
		sqlStringBuilder.append("    crops_level BIGINT(10) DEFAULT '0' COMMENT '作物等级',");
		sqlStringBuilder.append("    crops_need_time BIGINT(10) COMMENT '成熟需要时间秒',");
		sqlStringBuilder.append("    crops_need_time1 BIGINT(10) COMMENT '阶段需要时间秒1',");
		sqlStringBuilder.append("    crops_need_time2 BIGINT(10) COMMENT '阶段需要时间秒2',");
		sqlStringBuilder.append("    crops_need_time3 BIGINT(10) COMMENT '阶段需要时间秒3',");
		sqlStringBuilder.append("    crops_need_time4 BIGINT(10) COMMENT '阶段需要时间秒4',");
		sqlStringBuilder.append("    crops_need_time5 BIGINT(10) COMMENT '阶段需要时间秒5',");
		sqlStringBuilder.append("    plant_time BIGINT(10) DEFAULT '0' COMMENT '种植时间-秒',");
		sqlStringBuilder.append("    crops_state BIGINT(10) DEFAULT '0' COMMENT '作物状态',");
		sqlStringBuilder.append("    stage_id VARCHAR(64) COMMENT '当前阶段ID',");
		sqlStringBuilder.append("    stage_name VARCHAR(128) COMMENT '当前阶段名称',");
		sqlStringBuilder.append("    action_id VARCHAR(64) COMMENT '阶段互动ID',");
		sqlStringBuilder.append("    action_name VARCHAR(128) COMMENT '阶段互动名称',");
		sqlStringBuilder.append("    action_command_page VARCHAR(400) COMMENT '功能操作指令',");
		sqlStringBuilder.append("    action_command_api VARCHAR(400) COMMENT '服务操作指令',");
		sqlStringBuilder.append("    need_time BIGINT(10) COMMENT '当前阶段需要时间(秒)',");
		sqlStringBuilder.append("    seasons_num BIGINT(10) DEFAULT '0' COMMENT '季数',");
		sqlStringBuilder.append("    fruit_max BIGINT(10) DEFAULT '0' COMMENT '最大果实数目',");
		sqlStringBuilder.append("    fruit_steal_max BIGINT(10) DEFAULT '0' COMMENT '最大可偷取果实数目',");
		sqlStringBuilder.append("    fruit_steal_left BIGINT(10) DEFAULT '0' COMMENT '剩余可偷取果实数目',");
		sqlStringBuilder.append("    fruit_price BIGINT(10) DEFAULT '0' COMMENT '果实单价-分',");
		sqlStringBuilder.append("    fruit_volume BIGINT(10) DEFAULT '0' COMMENT '果实占用仓库容积大小',");
		sqlStringBuilder.append("    crops_exp BIGINT(10) DEFAULT '0' COMMENT '可以获得经验数目',");
		sqlStringBuilder.append("    left_watering BIGINT(10) DEFAULT '0' COMMENT '剩余浇水数目',");
		sqlStringBuilder.append("    left_weeding BIGINT(10) DEFAULT '0' COMMENT '剩余除草数目',");
		sqlStringBuilder.append("    left_insect BIGINT(10) DEFAULT '0' COMMENT '剩余杀虫数目',");
		sqlStringBuilder.append("    left_fertilize BIGINT(10) DEFAULT '0' COMMENT '剩余施肥数目',");
		sqlStringBuilder.append("    memo VARCHAR(200) COMMENT '备注',");
		sqlStringBuilder.append("    fb1 VARCHAR(40) COMMENT '备用1',");
		sqlStringBuilder.append("    fb2 VARCHAR(20) COMMENT '备用2',");
		sqlStringBuilder.append("    fb3 VARCHAR(50) COMMENT '备用3',");
		sqlStringBuilder.append("    fb4 VARCHAR(200) COMMENT '备用4',");
		sqlStringBuilder.append("    fb5 VARCHAR(80) COMMENT '备用5',");
		sqlStringBuilder.append("    eb1 VARCHAR(40) COMMENT '扩展1',");
		sqlStringBuilder.append("    eb2 VARCHAR(80) COMMENT '扩展2',");
		sqlStringBuilder.append("    eb3 VARCHAR(20) COMMENT '扩展3',");
		sqlStringBuilder.append("    eb4 VARCHAR(10) COMMENT '扩展4',");
		sqlStringBuilder.append("    eb5 VARCHAR(20) COMMENT '扩展5',");
		sqlStringBuilder.append("    sid VARCHAR(20) COMMENT '数据归属系统',");
		sqlStringBuilder.append("    del_flag CHAR(1) DEFAULT '0' COMMENT '有效标识',");
		sqlStringBuilder.append("    create_time VARCHAR(24) DEFAULT '2018-02-02' NOT NULL COMMENT '创建时间',");
		sqlStringBuilder.append("    creator VARCHAR(64) DEFAULT 'SYSTEM' NOT NULL COMMENT '创建者',");
		sqlStringBuilder.append("    update_time VARCHAR(24) COMMENT '更新时间',");
		sqlStringBuilder.append("    updator VARCHAR(64) COMMENT '最后更新者',");
		sqlStringBuilder.append("  PRIMARY KEY (id)");
		sqlStringBuilder.append(") COMMENT '玩家农场土地信息';");

		return sqlStringBuilder.toString();
	}

}
